<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script>
        //字符串替换
        var str = "我正在看新闻联播";
        console.log(str);
        console.log(str.replace(/新闻联播/,'人民的名义'))
    </script>
</head>
<body>

</body>
</html>